﻿using System;
using Common.Logging;

namespace Inovout.Web
{
    public abstract class BaseUnhandledExceptionFilter
    {
        protected readonly ILog log;
        protected BaseUnhandledExceptionFilter()
        {
            this.log = LogManager.GetLogger(this.GetType());
        }

        protected void OnException(ExceptionContext exceptionContext)
        {
            foreach (var exception in exceptionContext.Exceptions)
            {
                log.Error("UnhandledExcepton,{Message}", exception);
            }
        }
    }
}
